package com.kevin.executors;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;

import com.kevin.action.JdbcParams;
import com.kevin.table.MDataColumn;
import com.kevin.table.MDataTable;
import com.kevin.transaction.Transaction;

public interface Executor {
	Transaction getTransaction();

	void close(boolean forceRollback);

	boolean isClosed();

	void commit(boolean required) throws SQLException;

	void rollback(boolean required) throws SQLException;

	MDataColumn getColumns(String tableName) throws SQLException;
	
	Map<String, String> getTables();
	
	boolean isPrimaryKey(String tableName,String columnName) throws SQLException;
	
	int update(String sql,JdbcParams[] paramList);

	int updateBatch(String sql,JdbcParams[] paramList,int oneCount);
	
	ResultSet query(String sql,JdbcParams[] paramList);

}
